/**
 * author:Administrator
 * date:2016/1/4
 * desc:TODO
 */

'use strict';
var assert = require('assert');
var dao = require('../dao/book.js');
var biz = {};
module.exports = biz;

biz.create = function*(json) {
  var retObj = yield dao.create(json.name, json.uid);
  return {errcode: 0, book: retObj.dataValues};
};

biz.get = function*(id) {
  var retObj = yield dao.findById(id);
  return {errcode: 0, book: retObj.dataValues};
};
